jQuery.fn.initMenu = function() 
{
	return this.each(function() 
	{
		var theMenu = $(this).get(0);
		$('.right_nav_content', this).hide();
		
		$('.right_nav_tag .right_nav_content', this).show();
		$('.right_nav_tag .right_nav_content', this).addClass('right_nav_title_active');
		
		$('.right_nav_popular .right_nav_content', this).show();
		$('.right_nav_popular .right_nav_content', this).addClass('right_nav_title_active');
		
		$('.right_nav_title', this).click(
			function(e) 
			{
				var theElement = $(this);
				var parent = this.parentNode;
				var theChildren = $(parent).children(".right_nav_content");
				
				
				$('.right_nav_content').hide();
		
				if (theChildren.hasClass('right_nav_title_active')){
					theChildren.hide();
					
					theChildren.removeClass('right_nav_title_active');
				}else{
					theChildren.show();
					
					theChildren.addClass('right_nav_title_active');
				}
					
			}
		);
		
		
	});
};

$(document).ready(
	function()
	{
		$('#container_right_content').initMenu();
	}
);
